Ad Widget

Collapse

Oracle & Zabbix 1.8 (Îøèáêè)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dotneft
    Senior Member
    • Nov 2008
    • 699

    #1

    Oracle & Zabbix 1.8 (Îøèáêè)

    â items âîçíèêàåò îøèáêà:

    Code:
    ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00918: column ambiguously defined[/var/www/zabbix/php/include/db.inc.php:484]
    SQL error [ORA-00918: column ambiguously defined] in [select * from (SELECT i.*,i.hostid,h.host FROM items i,hosts h WHERE round(i.itemid/100000000000000) in (0) AND i.type<>9 AND (i.hostid IN (10017)) AND h.hostid=i.hostid AND UPPER(h.host)='ZABBIX SERVER') where rownum between 0 and 1001]
    ocierror() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:405]
    SQL error [] in []
    ocifetchinto() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:534]
    ïðîáëåìà ïîõîæå â api/classes/class.citem.php:

    Code:
                            if(!is_null($options['extendoutput'])){
                                    $sql_parts['select']['hostid'] = 'i.hostid';
                            }
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Поправил. Спасибо.
    Zabbix | ex GUI developer

    Comment

    • dotneft
      Senior Member
      • Nov 2008
      • 699

      #3
      Code:
      ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00979: not a GROUP BY expression[/var/www/zabbix/php/include/db.inc.php:484]
      SQL error [ORA-00979: not a GROUP BY expression] in [SELECT hg.groupid, g.name FROM hosts_profiles p, hosts_profiles_ext pe, hosts_groups hg, groups g WHERE (hg.hostid=p.hostid OR hg.hostid=pe.hostid) AND g.groupid=hg.groupid AND (hg.groupid IN (0,4)) GROUP BY hg.groupid]
      ocierror() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:405]
      SQL error [] in []
      ocifetchinto() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:534]
      çà÷åì ãðóïïèðîâêà ÿ òàê è íå ïîíÿë

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        Вот и я не знаю.. наверно хотели написать DISTINCT, но опечатались.
        Zabbix | ex GUI developer

        Comment

        • dotneft
          Senior Member
          • Nov 2008
          • 699

          #5
          àíàëîãè÷íî

          Code:
          ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00979: not a GROUP BY expression[/var/www/zabbix/php/include/db.inc.php:484]
          SQL error [ORA-00979: not a GROUP BY expression] in [select * from (SELECT h.host, h.hostid, t.triggerid, t.description, t.expression, t.lastchange, t.priority, count(distinct e.eventid) as cnt_event FROM hosts h, triggers t, functions f, items i, events e WHERE h.hostid = i.hostid and i.itemid = f.itemid and t.triggerid=f.triggerid and t.triggerid=e.objectid and e.object=0 and e.clock>1251824200 and (t.triggerid IN (12456,12460,12469,12479,12496,12499,12500,12502,12510,12516,12521,12524,12529,12532,12552,12558,12562,12565,12567,12575,12590,12601,12614,12616,12629,12643,12653,12654,12734,12737,12739,12765,12767,12784,12785,12786,12802,12803,12809,12817,12822,12839,12842,12847,12854,12864,12871,12872,12873,12878,12883,12885,12887,12891,12895,12909,12913,12932,12936,12965,12979,12982,12983,12992,12993,10048,10091,10029,10015,10045,12035,12070,12071,12072,12075,12078,12087,12101,12103,12104,12118,12120,12131,12135,12138,12143,12160,12179,12194,10169,10006,12213,12215,12226,12246,12247,12248,12257,12258,12259,12265,12275,12276,12278,12284,12316,12323,12329,12348,12350,12354,12366,12372,12373,12375,12376,12378,12380,12392,12396,12407,12408,12409,12412,12421,12430,12432,12435,12443,12452,12455,12470,12473,12476,12477,12480,12484,12497,12517,12519,12523,12534,12535,12538,12543,12545,12563,12576,12578,12598,12606,12608,12637,12639,12649,12658,12659,12665,12682,12683,12685,12688,12697,12704,12709,12710,12718,12736,12743,12777,12791,12796,12804,12811,12812,12815,12823,12827,12829,12830,12831,12869,12881,12890,12901,12938,12944,12948,12954,12959,12966,12976,12991,12995,10059,10044,10191,12002,12006,12028,12031,12043,12059,12064,12065,12093,12106,12117,12128,12136,12137,12140,12145,12150,12152,12165,12167,12196,12200,12206,10165,10004,12228,12236,12238,12269,12279,12281,12283,12291,12303,12306,12313,12330,12332,12342,12344,12361,12365,12369,12371,12395,12403,12429,12447,12448,12458,12462,12481,12492,12498,12505,12507,12515,12525,12526,12528,12546,12556,12560,12561,12573,12581,12582,12603,12607,12613,12620,12622,12625,12633,12638,12641,12644,12651,12657,12670,12690,12691,12698,12699,12701,12702,12707,12711,12717,12729,12742,12750,12751,12755,12756,12757,12776,12778,12781,12793,12819,12849,12867,12882,12902,12908,12911,12912,12927,12946,12951,12952,12956,12973,12975,12980,12987,12988,12996,10057,10021,10043,10032,12013,12021,12030,12040,12063,12076,12077,12085,12088,12099,12100,12108,12112,12113,12116,12125,12130,12184,12195,10168,12214,12224,12227,12229,12231,12252,12266,12273,12277,12287,12288,12289,12308,12320,12326,12337,12340,12346,12349,12370,12386,12387,12397,12404,12420,12425,12439,12440,12444,12459,12466,12468,12472,12475,12488,12489,12490,12491,12493,12508,12520,12533,12537,12544,12550,12551,12553,12557,12564,12566,12574,12586,12589,12591,12592,12602,12605,12617,12621,12632,12647,12662,12666,12668,12675,12678,12679,12693,12703,12713,12744,12758,12759,12764,12768,12773,12800,12818,12820,12843,12844,12845,12848,12856,12858,12860,12865,12874,12892,12910,12930,12931,12939,12942,12945,12958,12960,12962,12968,12985,12990,12994,10014,10016,10034,10041,10035,10036,10092,12005,12012,12020,12026,12036,12048,12054,12061,12068,12069,12082,12091,12097,12123,12133,12139,12142,12146,12147,12157,12161,12172,12174,12186,12188,12199,10164,10002,12211,12216,12217,12220,12239,12244,12253,12254,12260,12262,12268,12280,12282,12290,12300,12301,12302,12305,12309,12311,12315,12319,12338,12345,12355,12359,12362,12377,12388,12390,12391,12398,12405,12411,12424,12434,12436,12446,12451,12454,12464,12482,12494,12501,12509,12512,12514,12518,12531,12539,12569,12571,12584,12585,12597,12599,12611,12612,12640,12655,12672,12686,12692,12694,12706,12726,12728,12731,12745,12761,12769,12787,12792,12801,12805,12806,12825,12840,12861,12862,12875,12877,12899,12906,12914,12928,12941,12949,12953,12970,12998,10010,10013,10094,10042,10022,10023,10001,10047,10190,10039,12001,12017,12018,12019,12022,12045,12047,12060,12062,12084,12110,12119,12127,12134,12149,12151,12158,12164,12166,12168,12170,12173,12177,12189,12191,12192,12197,10163,12209,12221,12222,12225,12233,12234,12255,12263,12267,12292,12304,12307,12322,12360,12382,12384,12402,12413,12437,12438,12442,12445,12457,12478,12485,12503,12504,12522,12530,12540,12541,12548,12572,12594,12610,12615,12626,12630,12631,12634,12635,12645,12646,12650,12652,12660,12667,12669,12671,12674,12677,12680,12681,12689,12695,12705,12712,12715,12719,12723,12724,12725,12732,12738,12741,12746,12752,12762,12770,12771,12774,12779,12782,12788,12795,12810,12816,12826,12832,12833,12834,12835,12836,12838,12852,12855,12868,12870,12876,12884,12893,12894,12897,12904,12943,12957,12961,12967,12978,12981,12989,10056,10081,10028,10046,10061,10049,12008,12009,12014,12029,12041,12042,12056,12067,12074,12092,12122,12124,12132,12141,12148,12153,12156,12169,12171,12176,12181,12193,12203,12204,12205,10173,10017,10005,10007,12210,12212,12242,12249,12270,12274,12293,12296,12298,12318,12325,12335,12339,12353,12357,12358,12394,12410,12422,12423,12427,12431,12433,12453,12461,12463,12471,12474,12506,12511,12527,12547,12554,12555,12559,12577,12579,12580,12588,12593,12609,12618,12627,12628,12636,12642,12673,12684,12696,12708,12716,12721,12727,12730,12735,12740,12748,12749,12753,12754,12766,12775,12780,12783,12797,12799,12813,12821,12824,12841,12846,12850,12857,12859,12866,12879,12896,12903,12905,12929,12933,12934,12935,12947,12972,12974,12984,12986,12997,12999,10030,10058,10031,10012,10024,10037,10011,10038,12007,12025,12033,12034,12052,12053,12055,12080,12081,12086,12089,12090,12095,12096,12102,12109,12111,12114,12121,12126,12129,12154,12159,12163,12175,12178,12182,12185,12198,12202,10187,10189,10019,10018,12219,12230,12243,12256,12261,12271,12272,12286,12294,12312,12317,12321,12327,12328,12331,12333,12343,12351,12352,12356,12363,12364,12367,12368,12383,12393,12400,12401,12414,12417,12418,12419,12428,12449,12450,12465,12467,12483,12486,12487,12495,12513,12536,12542,12549,12568,12570,12583,12587,12595,12596,12600,12604,12619,12623,12624,12648,12656,12661,12663,12664,12676,12687,12700,12714,12720,12722,12733,12747,12760,12763,12772,12789,12790,12794,12798) OR t.triggerid IN (12807,12808,12814,12828,12837,12851,12853,12863,12880,12886,12888,12889,12898,12900,12907,12937,12940,12950,12955,12963,12964,12969,12971,12977,10068,10033,10027,12003,12004,12010,12011,12015,12016,12023,12024,12027,12032,12037,12038,12039,12044,12046,12049,12050,12051,12057,12058,12066,12073,12079,12083,12094,12098,12105,12107,12115,12144,12155,12162,12180,12183,12187,12190,12207,12208,10020,10008,12218,12223,12232,12235,12237,12240,12241,12245,12250,12251,12264,12285,12295,12297,12299,12310,12314,12324,12334,12336,12341,12347,12374,12379,12381,12385,12389,12399,12406,12415,12416,12426,12441)) and round(t.triggerid/100000000000000) in (0) GROUP BY h.host,t.triggerid,t.description,t.expression,t.priority ORDER BY cnt_event desc, h.host, t.description, t.triggerid) where rownum between 0 and 100]
          ocierror() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:405]
          SQL error [] in []
          ocifetchinto() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:534]

          Comment

          • dotneft
            Senior Member
            • Nov 2008
            • 699

            #6
            åùå íàøåë â ôàéëå include/hosts.inc.php 2057/2099

            Code:
            ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00904: "GRP_COUNT": invalid identifier[/var/www/zabbix/php/include/db.inc.php:484]
            SQL error [ORA-00904: "GRP_COUNT": invalid identifier] in [SELECT hg.hostid, count(hg.groupid) as grp_count FROM hosts_groups hg WHERE hostgroupid>0 GROUP BY hg.hostid HAVING grp_count > 1]
            ocierror() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:405]
            SQL error [] in []
            ocifetchinto() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:534]
            ñëåäóåò çàìåíèòü çàïðîñ íà

            Code:
                            $sql = 'SELECT hg.hostid, count(hg.groupid) as grp_count '.
                                            ' FROM hosts_groups hg '.
                                            ' WHERE hostgroupid>0 '.
                                            $sql_where.
                                            ' GROUP BY hg.hostid '.
                                            ' HAVING count(hg.groupid) > 1';

            Comment

            • dotneft
              Senior Member
              • Nov 2008
              • 699

              #7
              åùå

              Code:
              ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00918: column ambiguously defined[/var/www/zabbix/php/include/db.inc.php:484]
              SQL error [ORA-00918: column ambiguously defined] in [select * from (SELECT a.*,a.hostid FROM applications a WHERE round(a.applicationid/100000000000000) in (0) AND (a.hostid IN (10017)) ) where rownum between 0 and 1001]
              ocierror() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:405]
              SQL error [] in []
              ocifetchinto() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:534]
              íåòó ñìûñëà âûáèðàòü a.hostid, ò.ê. óæå a.* åñòü

              Comment

              • dotneft
                Senior Member
                • Nov 2008
                • 699

                #8
                Ïåðåìåííàÿ time_end è limit íå çàäàíû íèãäå, íî ïåðåäàþòñÿ.

                Code:
                Undefined variable: time_end[/var/www/zabbix/php/events.php:205]
                Undefined variable: limit[/var/www/zabbix/php/events.php:205]
                ociexecute() [<a href='function.ociexecute'>function.ociexecute</a>]: ORA-00936: missing expression[/var/www/zabbix/php/include/db.inc.php:484]
                SQL error [ORA-00936: missing expression] in [SELECT DISTINCT e.source,e.object,e.objectid,e.clock,e.value FROM events e WHERE e.source=1 AND e.clock< ORDER BY e.clock DESC]
                ocierror() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:405]
                SQL error [] in []
                ocifetchinto() expects parameter 1 to be resource, boolean given[/var/www/zabbix/php/include/db.inc.php:534]

                Comment

                • dotneft
                  Senior Member
                  • Nov 2008
                  • 699

                  #9
                  Ïðè ïðîñìîòðå ñîñòîÿíèÿ òðèããåðîâ

                  Code:
                  Undefined index: t.lastchange[/var/www/zabbix/php/include/func.inc.php:470]
                  Undefined index: t.lastchange[/var/www/zabbix/php/include/func.inc.php:471]
                  Undefined index: t.lastchange[/var/www/zabbix/php/include/func.inc.php:470]

                  Comment

                  • Aly
                    ZABBIX developer
                    • May 2007
                    • 1126

                    #10
                    Originally posted by dotneft
                    ãã°ã¨ ã¯ã°ã®ã±ã¬ã®ã²ã°ã¥ ã±ã®ã±ã²ã®ã¿ã*ã¨ã¿ ã²ã°ã¨ã£ã£ã¥ã°ã®ã¢

                    Code:
                    undefined index: T.lastchange[/var/www/zabbix/php/include/func.inc.php:470]
                    undefined index: T.lastchange[/var/www/zabbix/php/include/func.inc.php:471]
                    undefined index: T.lastchange[/var/www/zabbix/php/include/func.inc.php:470]
                    Это у вас старые профайлы остались, нужно чтоб перезаписались.

                    Остальное вроде пофиксил.
                    Zabbix | ex GUI developer

                    Comment

                    • dotneft
                      Senior Member
                      • Nov 2008
                      • 699

                      #11
                      Originally posted by aly
                      ýòî ó âàñ ñòàðûå ïðîôàéëû îñòàëèñü, íóæíî ÷òîá ïåðåçàïèñàëèñü.

                      îñòàëüíîå âðîäå ïîôèêñèë.
                      ýì... âñìûñëå ïðîôàéëû?

                      Comment

                      • dotneft
                        Senior Member
                        • Nov 2008
                        • 699

                        #12
                        èìååòñÿ ïðîáëåìà ñ òàáëèöåé ids, à èìåííî ïîñòîÿííî èäåò îáíîâëåíèå eventid íàðàùèâàíèå. Ìîæåò â Oracle ñòîèò èñïîëüçîâàòü sequence âìåñòî ýòîé òàáëèöû?

                        Âñå áóäåò ãîðàçäî ïðîùå

                        Comment

                        • dotneft
                          Senior Member
                          • Nov 2008
                          • 699

                          #13
                          Ïîåõàëè îøèáêè óæå zabbix_server:

                          Code:
                           32038:20090916:151500.750 [Z3005] Query failed: [-1] ORA-01747: invalid user.table.column, table.column, or column specification
                           [select m.maintenanceid,m.maintenance_type,m.active_since,tp.timeperiod_type,tp.every,tp.month,tp.dayofweek,tp.day,tp.start_time,tp.period,tp.date from maintenances m,maintenances_windows mw,timeperiods tp where m.maintenanceid=mw.maintenanceid and mw.timeperiodid=tp.timeperiodid and 1253092500 between m.active_since and m.active_till]
                          èìÿ êîëîíêè tp.date íåäîïóñòèìî, ò.ê. date çàðåçåðâèðîâàííîå ñëîâî â Oracle.

                          Comment

                          • dotneft
                            Senior Member
                            • Nov 2008
                            • 699

                            #14
                            Ïðè óñëîâèè, ÷òî Oracle íàõîäèòñÿ íà îäíîì ñåðâåðå, ÷òî è zabbix-server, íå óäàëîñü çàêîííåêòèòü èõ áåç ïðàâêè êîäà(

                            â db.c zbxdb èçìåíèë âûçîâ OCILogon2, âìåñòî connect âûñòàâèë òîëüêî íàçâàíèå áàçû, ïîñëå ýòîãî âñå ñòàëî îòëè÷íî ðàáîòàòü

                            Comment

                            • dotneft
                              Senior Member
                              • Nov 2008
                              • 699

                              #15
                              слишком, большие числа не вставляются в Oracle снятых с unix сетевых интерфейсов. Например:

                              RX bytes:4662400358298 (4.2 TiB) TX bytes:4662400358298 (4.2 TiB)

                              Не добавляется(

                              Необходимо изменить в sysinfo.c:

                              Code:
                              Index: src/libs/zbxsysinfo/sysinfo.c
                              ===================================================================
                              --- src/libs/zbxsysinfo/sysinfo.c       (revision 7923)
                              +++ src/libs/zbxsysinfo/sysinfo.c       (working copy)
                              @@ -539,8 +539,13 @@
                               {
                               #if defined(HAVE_POSTGRESQL) || defined(HAVE_ORACLE) || defined(HAVE_SQLITE3)
                                      /* field with precision 16, scale 4 [NUMERIC(16,4)] */
                              -       register double pg_min_numeric = (double)-1E12;
                              -       register double pg_max_numeric = (double)1E12;
                              +#ifdef HAVE_ORACLE
                              +       register double pg_min_numeric = (double)-1E16;
                              +       register double pg_max_numeric = (double)1E16;
                              +#else
                              +        register double pg_min_numeric = (double)-1E12;
                              +        register double pg_max_numeric = (double)1E12;
                              +#endif
                              
                                      if (value <= pg_min_numeric || value >= pg_max_numeric)
                                              return FAIL;
                              эта проблема как в транковой версии, так и в 1.6 бранче.

                              ЗЫ: даже боюсь представить, что будет дальше) аптайм сервера всего 41 день и столько трафика О_О
                              Last edited by dotneft; 19-09-2009, 16:40.

                              Comment

                              Working...